Fix dep_targets for tests depending on libraries
authorAlex Crichton <alex@alexcrichton.com>
Tue, 3 Mar 2015 03:17:25 +0000 (19:17 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 3 Mar 2015 03:30:57 +0000 (19:30 -0800)
commitb5f23288f7cedd188c7818b5ccdd6915ff2c343e
tree3e53b6c3f5d64138f926a98756956ee850ac0d75
parent98e48728c9aeb98952a789c154076b6697cbfc86
Fix dep_targets for tests depending on libraries

Before this commit the `dep_targets` function of `Context` didn't actually
return all dependencies in the sense that unit tests (and likely examples) would
not have the same package's library listed as a dependency. This commit
rectifies the situation by ensuring that the package's library is included
whenever necessary in the dependency list.

Closes #1289
src/cargo/ops/cargo_rustc/context.rs
src/cargo/ops/cargo_rustc/mod.rs
tests/test_cargo_freshness.rs